package ay.shadow.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import ay.shadow.seckill.entity.Order;
import ay.shadow.seckill.entity.User;
import ay.shadow.seckill.entity.vo.GoodsVo;
import ay.shadow.seckill.entity.vo.OrderDetailVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cosmos
 * @since 2022-12-26
 */
public interface IOrderService extends IService<Order> {


    /**
     * @Param
     * @Description 秒杀
     * @Return
     */
    Order seckill(User user, GoodsVo goods);
    /**
     * @Param
     * @Description 订单详情
     * @Return
     */
    OrderDetailVo detail(Long orderId);

    String createPath(User user, Long goodsId);


    /**
     * @Param
     * @Description 判断路径是否正确
     * @Return
     */
    boolean checkPath(User user, Long goodsId, String path);
    /**
     * @Param
     * @Description 校对验证码
     * @Return
     */
    boolean checkCaptcha(User user, Long goodsId, String captcha);
}
